<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
    />
    <title>欢迎登录</title>
    <link rel="shortcut icon" href="../../favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="./css/common.css" />
    <style>
      .iframe-wrapper {
        width: 100%;
        height: 100%;
        position: absolute;
      }

      .login-wrapper {
        position: fixed;
        top: 50%;
        left: 50%;
        width: 500px;
        height: 560px;
        margin-left: -250px;
        margin-top: -280px;
        color: #fff;
        box-shadow: 0 0 10px #fff;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
      }

      .login-wrapper > div {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        margin: 30px 0;
      }

      .logo {
        width: 100px;
        height: 100px;
        background: url(../resource/images/logo.png) no-repeat center;
        background-size: cover;
      }

      .login-username,
      .login-password,
      .login-area {
        width: 300px;
        height: 40px;
        position: relative;
      }

      .login-username input,
      .login-password input {
        width: 100%;
        height: 100%;
        border: none;
        text-indent: 50px;
        font-size: 20px;
        cursor: not-allowed;
      }

      .login-area select {
        width: 100%;
        height: 100%;
        border: none;
        padding-left: 50px;
        font-size: 20px;
        /* appearance: none; */
      }

      .login-username input:focus,
      .login-password input:focus,
      .login-area select:focus {
        outline: none;
      }

      .login-btn {
        width: 300px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #dc232b;
        border-radius: 10px;
        cursor: pointer;
        font-size: 24px;
        font-weight: bold;
      }

      .icon-username,
      .icon-password,
      .icon-area {
        width: 24px;
        height: 24px;
        position: absolute;
        top: 9px;
        left: 9px;
        background-size: contain;
      }

      .icon-username {
        background-image: url(../resource/images/用户.png);
      }

      .icon-password {
        background-image: url(../resource/images/密码.png);
      }

      .icon-area {
        background-image: url(../resource/images/建筑.png);
      }
    </style>
  </head>

  <body>
    <div id="v-bg" class="iframe-wrapper"></div>
    <div class="login-wrapper">
      <div>
        <div class="logo"></div>
      </div>
      <div>智慧园区管理平台</div>
      <div>
        <div class="login-username">
          <div class="icon-username"></div>
          <input type="text" value="admin" readonly />
        </div>
      </div>
      <div>
        <div class="login-password">
          <div class="icon-password"></div>
          <input type="password" value="123456" readonly />
        </div>
      </div>
      <div>
        <div class="login-area">
          <div class="icon-area"></div>
          <select>
            <option value="1">智慧园区</option>
            <option value="2">智慧建筑</option>
          </select>
        </div>
      </div>
      <div>
        <div
          class="login-btn"
          onclick="let area = document.querySelector('.login-area select').value;top.login(area)"
        >
          登录
        </div>
      </div>
    </div>
    <script src="./js/lib/vanta/three.r92.min.js"></script>
    <script src="./js/lib/vanta/vanta.birds.min.js"></script>
    <script>
      VANTA.BIRDS({
        el: "#v-bg",
        birdSize: 1.5,
        wingSpan: 21.0,
        speedLimit: 4.0,
        separation: 32.0,
        alignment: 33.0,
        cohesion: 33.0,
        quantity: 2.0,
      });
    </script>
  </body>
</html>
